package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.service.MessageModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface MessageFeign {

    /**
     * 预警消息列表
     * @param parm
     * @return
     */
    @PostMapping("/message/list")
    MsgModel productList(@RequestBody ParmsModel parm);

    /**
     * 修改消息状态
     * @param id
     */
    @PostMapping("/message/updateState")
    void updateState(@RequestBody Integer id);

    /**
     * 根据id获取信息
     * @param id
     * @return
     */
    @PostMapping("/message/findByid")
    MessageModel findByid(@RequestBody Integer id);
}
